/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.sanerzone.smscenter.modules.sms.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sanerzone.jeebase.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 单表生成Entity
 * @author ThinkGem
 * @version 2018-04-25
 */
public class SmsReceiveAccount extends DataEntity<SmsReceiveAccount> {
	
	private static final long serialVersionUID = 1L;
	private Integer accId;		// 账号ID
	private Integer userid;		// 用户ID
	private String uuid;		// 唯一id
	private String msgid;		// 消息流水号
	private String spnumber;		// 发送号码
	private String phone;		// 上行手机号
	private String smsContent;		// 回复内容
	private String gatewayId;		// 通道code
	private String gwName;			// 网关名称
	private Date createtime;		// 创建时间
	private Date sendtime;		// 发送时间
	private String result;		// 结果
	private Integer pushFlag;		// 推送标识
	
	public SmsReceiveAccount() {
		super();
	}

	public SmsReceiveAccount(String id){
		super(id);
	}

	public Integer getAccId() {
		return accId;
	}

	public void setAccId(Integer accId) {
		this.accId = accId;
	}
	
	@NotNull(message="用户ID不能为空")
	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	
	@Length(min=0, max=64, message="唯一id长度必须介于 0 和 64 之间")
	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	
	@Length(min=0, max=32, message="消息流水号长度必须介于 0 和 32 之间")
	public String getMsgid() {
		return msgid;
	}

	public void setMsgid(String msgid) {
		this.msgid = msgid;
	}
	
	@Length(min=0, max=32, message="发送号码长度必须介于 0 和 32 之间")
	public String getSpnumber() {
		return spnumber;
	}

	public void setSpnumber(String spnumber) {
		this.spnumber = spnumber;
	}
	
	@Length(min=1, max=32, message="上行手机号长度必须介于 1 和 32 之间")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=2000, message="回复内容长度必须介于 0 和 2000 之间")
	public String getSmsContent() {
		return smsContent;
	}

	public void setSmsContent(String smsContent) {
		this.smsContent = smsContent;
	}
	
	@Length(min=0, max=36, message="通道code长度必须介于 0 和 36 之间")
	public String getGatewayId() {
		return gatewayId;
	}

	public void setGatewayId(String gatewayId) {
		this.gatewayId = gatewayId;
	}

	public String getGwName() {
		return gwName;
	}

	public void setGwName(String gwName) {
		this.gwName = gwName;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getSendtime() {
		return sendtime;
	}

	public void setSendtime(Date sendtime) {
		this.sendtime = sendtime;
	}
	
	@Length(min=0, max=255, message="结果长度必须介于 0 和 255 之间")
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	
	public Integer getPushFlag() {
		return pushFlag;
	}

	public void setPushFlag(Integer pushFlag) {
		this.pushFlag = pushFlag;
	}
	
}